const {
    Mysql
} = require('../tools/utils');
module.exports = async (ctx) => {
    let sql = `SELECT * from swiper`;
    try {
        let res = await Mysql(sql);
        ctx.state.data = {
            canPlay: true, //电影可否播放
            iosPay: false, //IOS付款
            forceLogin: true, //强制登陆
            lockPay: false,
            showAd: true,
            list: res,
            elan: {
                type: 4,
                imgUrl: 'http://mars-kino.oss-cn-beijing.aliyuncs.com/MarsVideo/20191110122011913.jpg',
                adUrl: '/pages/Share/Share',
                content:'مارىس كىنوخانىسىدىن ھەقسىز ئالىي ئەزالىق تارقاتتۇق'
            },
            msg: 'مۇۋەپپەقىيەتلىك بولدى',
            code: '001'
        }
    } catch (error) {
        ctx.state.data = {
            msg: 'مەغلۇپ بولدى',
            code: '002'
        }
    }
}